Skip to content

Fix evergreen agent "Branch does not exist locally" push failure#79

Merged
mrjf merged 2 commits into
mainfrom
copilot/fix-evergreen-merge-issue
Apr 8, 2026
Merged

Fix evergreen agent "Branch does not exist locally" push failure#79
mrjf merged 2 commits into
mainfrom
copilot/fix-evergreen-merge-issue

Conversation

Copilot AI commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

The evergreen agent was failing to push merge conflict resolutions with push_to_pull_request_branch returning "Branch does not exist locally". This happened ~20+ times on PR #58 because the agent would check out the PR branch as a detached HEAD, which the push tool cannot create patches from.

  • Updated agent instructions in evergreen.md step 2 to require a named local tracking branch:
    git checkout -b <head_branch> origin/<head_branch>
    with explicit guidance that detached HEAD checkouts are incompatible with the push tool.

Note: The earlier "protected files" push failures were separately fixed by PR #75 (protected-files: allowed). This addresses the remaining failure mode.

Copilot AI assigned Copilot and mrjf Apr 8, 2026
Copilot AI linked an issue Apr 8, 2026 that may be closed by this pull request
…re push

The push_to_pull_request_branch tool requires a named local branch to create
patches from. When the agent checks out the PR branch with a detached HEAD,
the tool fails with "Branch does not exist locally". Updated step 2 of the
agent instructions to explicitly use `git checkout -b` to create a local
tracking branch.

Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/d2700d0e-7bbb-4650-aa27-84a4b45b7c29

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix evergreen failing to merge due to tool failure Fix evergreen agent "Branch does not exist locally" push failure Apr 8, 2026
Copilot finished work on behalf of mrjf April 8, 2026 19:43
Copilot AI requested a review from mrjf April 8, 2026 19:43
@mrjf
mrjf marked this pull request as ready for review April 8, 2026 19:51
@mrjf

mrjf commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

@copilot you must recompile to change evergreen job with

gh aw compile

Copilot AI commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot you must recompile to change evergreen job with

gh aw compile
...

Ran gh aw compile .github/workflows/evergreen.md — it compiled successfully with no lock file changes needed. My edit was only in the prompt/instructions section (below the --- frontmatter), which doesn't affect the compiled YAML. The lock file header confirms this: "Not all edits will cause changes to this file."

Copilot finished work on behalf of mrjf April 8, 2026 19:53
@mrjf
mrjf merged commit 500d199 into main Apr 8, 2026
17 checks passed
@mrjf
mrjf deleted the copilot/fix-evergreen-merge-issue branch April 8, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

evergreen is still failing to merge

2 participants